-- GENERATED SPELL FOR [Hungarfen] --


function spell0_17770(pUnit, Event) --@Acid Geyser,n/a--
pUnit:FullCastSpellOnTarget(38739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17770', 749, 1)
end

function spell1_17770(pUnit, Event) --@Despawn Underbog Mushrooms,Self--
pUnit:FullCastSpellOnTarget(34874,pUnit)
pUnit:RegisterEvent('Sorts_17770', 796, 1)
end

function spell2_17770(pUnit, Event) --@Foul Spores,n/a--
pUnit:FullCastSpellOnTarget(31673,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17770', 11000, 1)
end

function Sorts_17770(pUnit, Event)
local choix_sorts_17770 = math.random(0, 2)
if choix_sorts_17770 == 0 then
pUnit:RegisterEvent('spell0_17770', 1, 1)
end
if choix_sorts_17770 == 1 then
pUnit:RegisterEvent('spell1_17770', 1, 1)
end
if choix_sorts_17770 == 2 then
pUnit:RegisterEvent('spell2_17770', 1, 1)
end
end

function mob17770_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17770', math.random(1500, 3000), 1)
end

function mob17770_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17770_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17770_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17770, 1, 'mob17770_Action')
RegisterUnitEvent(17770, 2, 'mob17770_Leave')
RegisterUnitEvent(17770, 3, 'mob17770_Kill')
RegisterUnitEvent(17770, 4, 'mob17770_Die')
